package hot100.二叉树最大深度;

import hot100.TreeNode;

/**
 * @author llt
 * @date 2025/4/23
 */
public class Test {
    public int maxDepth(TreeNode root) {
        if (root == null) {
            return 0;
        }
        return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));
    }
}
